<template>
  <div>
    <ViewTable
      :formItems="formItems"
      :tableColumns="tableColumns"
      :getTableDataService="getPriceGoodsDetails"
    />
  </div>
</template>
<script>
import ViewTable from './components/ViewTable';
import { FORM_ITEMS, TABLE_COLUMNS } from './constants/salePrice';
import { queryLabelProductService } from '@/api/commodity/commodityManage/productTagManage';
export default {
  components: {
    ViewTable
  },
  data () {
    return {
      formItems: [...FORM_ITEMS],
      tableColumns: [...TABLE_COLUMNS]
    }
  },
  methods: {
    getPriceGoodsDetails (data, loadingFn) {
      const params = {
        ...data,
        ruleType: this.$route.query?.ruleType
      }
      return queryLabelProductService(params, loadingFn)
    }
  }
}
</script>
